<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <title>Release Goods</title>
    
    <link rel="stylesheet" href="./css/releaseGoods.css">
    <link rel="stylesheet" href="./css/style.css">
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <script src="./js/jquery-1.11.3.min.js"></script>
    <script src="./js/jquery.validate.js"></script>
    <script src="./js/bootstrap.min.js"></script>
    <script src="./js/releaseGoods.js" async></script>
    
</head>
<body class="body-class">

	<jsp:include page="./front/head.jsp"></jsp:include>
	<div class="div-class" >
    <div class="content-contrainer">
      <div class="goods-form">
          <form action="goods!addGoods.action" id="form1" method="post" onsubmit="return checkfile()" enctype="multipart/form-data">
              <table class="form-table" style="font-weight: bold;">
                  <tr>
                      <td width="150px">标题：</td>
                      <td>
                          <div class="normal-div">
                              <input class="form-control input-sm" id="goods.goodsname" name="goods.goodname" type="text" placeholder="title">
                          </div>
                          <label for="goods.goodsname"  class="error">标题不能为空</label>
                      </td>
                  </tr>
                  <tr>
                      <td>分类：</td>
                      <td>
                          <select id="fathertype" name="fathertype" style="border: 1px;" >
                              <option selected>选择大类</option>
                              <option value="0">数码家电</option>
                              <option value="1">生活用品</option>
                          </select>
                          <select id="childtype" name="childtype" style="border: 1px;">
                              <option selected>选择小类</option>
                          </select>
                          <label id="typeLabel" style="font-size: 18px;color:red;"></label>
                      </td>
                  </tr>
                  <tr>
                  <td>价格：</td>
                  <td>
                          <div style="width: 200px;margin-top:10px;display: inline-block">
                              <div class="input-group">
                                  <input type="number" class="form-control col-sm-10" name="goods.price" id="goods.price"  placeholder="price">
                                  <div class="input-group-addon">元</div>
                              </div>
                          </div>
                          <div style="display: inline-block">
                              <label for="goods.price"  class="error">价格不能为空</label>
                          </div>
                  </td>
                  </tr>
                  <tr>
                      <td>几成新：</td>
                      <td>
                          <select name="goods.agingdegree">
                            <option value="10">全新</option>
                            <option value="9">九成</option>
                            <option value="8">八成</option>
                            <option value="7">七成</option>
                            <option value="6">六成</option>
                            <option value="5">五成</option>
                          </select>
                          </div>
                          <label for="goods.agingdegree"  class="error">成色不能为空</label>
                      </td>
                  </tr>
                  <tr>
                      <td>讲价：</td>
                      <td>
                          <div class="normal-div" style="width: 80px">
                              <div class="btn-group" data-toggle="buttons">
                                  <label class="btn btn-primary">
                                      <input type="radio" name="goods.bargin" value="true" id="bargin1" autocomplete="off">是
                                  </label>
                                  <label class="btn btn-primary">
                                      <input type="radio" name="goods.bargin" value="false" id="bargin2" autocomplete="off">否
                                  </label>
                              </div>
                          </div>
                          <label for="goods.bargin"  class="error">是否允许还价?</label>
                      </td>
                  </tr>
                  <tr>
                      <td>联系方式:</td>
                      <td>
                          <div class="normal-div">
                              <div class="input-group">
                                  <span class="input-group-addon"  id="basic-addon1">手机</span>
                                  <input type="text" class="form-control" name="user.phonenumber"  placeholder="号码" aria-describedby="basic-addon1">
                              </div>
                          </div>
                          <label for="user.phonenumber"  class="error">请填入正确的电话号码</label>
                      </td>
                  </tr>
                  <tr>
                      <td></td>
                      <td>
                          <div class="normal-div">
                              <div class="input-group">
                                  <span class="input-group-addon" id="basic-addon2"> Q Q </span>
                                  <input type="text" class="form-control" name="user.qq"  placeholder="QQ" aria-describedby="basic-addon1">
                              </div>
                          </div>
                          <label for="user.qq"  class="error">请填入正确的qq号码</label>
                      </td>
                  </tr>
                  <tr>
                      <td>图片上传：</td>
                      <td></td>
                  </tr>
                  <tr>
                      <td></td>
                      <td>
                          <div>
                              <img class="my-img"  name="imgs">
                              <img class="my-img"  name="imgs">
                              <img class="my-img" name="imgs">
                              <img class="my-img" name="imgs">
                              <img class="my-img" name="imgs">
                              <input name="imgfile" type="file" onchange="previewImage(this)" multiple="multiple" style="display: none"/>
                              <input name="imgfile" type="file" onchange="previewImage(this)" multiple="multiple" style="display: none"/>
                              <input name="imgfile" type="file" onchange="previewImage(this)" multiple="multiple" style="display: none"/>
                              <input name="imgfile" type="file" onchange="previewImage(this)" multiple="multiple" style="display: none"/>
                              <input name="imgfile" type="file" onchange="previewImage(this)" multiple="multiple" style="display: none"/>
                          </div>
                      </td>
                  </tr>
                  <tr>
                      <td></td>
                      <td>
                          <div id="dragfromdes" style="display: inline-block;cursor:pointer" onclick="selectImg()">
                              <h4 style="position: relative;margin-top: 40px">添加图片</h4>
                          </div>
                          <label id="filecheck" style="display: none;font-size: 18px;color: red;">请至少上传一张图片!</label>
                      </td>
                  </tr>
                  <tr>
                      <td>宝贝描述:</td>
                      <td>
                          <div style="margin-top:80px;width: 50%">
                            <!--   <textarea class="textarea" cols=35 rows=5 id="describe" name="goods.describe"  style="border: 1px;border-color: black;"></textarea> -->
                              <textarea class="form-control" id="describe" name="goods.describe" rows="3"></textarea>
                          </div>
                      </td>
                  </tr>
                  <tr><td></td><td><label id="textareaR" style="display: none;font-size: 18px;color: red;">请描述您的宝贝</label></td></tr>
                  <tr>
                      <td>
                          <div style="margin-top: 50px">
                              <input type="submit" class="btn btn-primary"  value="立刻发布">
                          </div>
                      </td>
                  </tr>
              </table>
          </form>
      </div>
        <div style="height: 100px">
        </div>
    </div>
    </div>
</body>
</html>
